<script type="text/javascript" charset="utf-8">
  //var boxHeight = $('<%= id %>').style.height.replace('px','')
  var repeatHeight = $('<%= id %>').scrollHeight //get the current height so we know when to wrap
  $('<%= id %>').innerHTML = $('<%= id %>').innerHTML + $('<%= id %>').innerHTML  //add a second copy so we can scroll down to the wrap point
  var stopScroll = 0
  var x
  function scrollMe() {     
      if(stopScroll==1) {
          return
      }
      if(stopScroll==0) {
        $('<%= id %>').scrollTop = $('<%= id %>').scrollTop + 1
      }
      clearTimeout(x)
      if($('<%= id %>').scrollTop <= repeatHeight) {
          // keep on scrolin' 
          x = setTimeout("scrollMe()",100)
      }
      else { //we have hit the wrap point
          $('<%= id %>').scrollTop=0
          x = setTimeout("scrollMe()",100)
      }
  }
  x = setTimeout("scrollMe()",1000)
  // start scrolling after one second
  
  function feeds_up() {
    $('<%= id %>').scrollTop = $('<%= id %>').scrollTop - 5;    
    clearTimeout(x)
    if($('<%= id %>').scrollTop <= repeatHeight) {
        // keep on scrolin' 
        x = setTimeout("feeds_up()",100)
    }
    else { //we have hit the wrap point
        $('<%= id %>').scrollTop=0
        x = setTimeout("feeds_up()",100)
    }
  }
  
  function feeds_down() {    
    $('<%= id %>').scrollTop = $('<%= id %>').scrollTop + 5;
    clearTimeout(x)
    if($('<%= id %>').scrollTop <= repeatHeight) {
        // keep on scrolin' 
        x = setTimeout("feeds_down()",100)
    }
    else { //we have hit the wrap point
        $('<%= id %>').scrollTop=0
        x = setTimeout("feeds_down()",100)
    }
  }
</script>